In tests, expect a non-git version number
authorDebian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>
Tue, 9 Dec 2025 11:19:37 +0000 (11:19 +0000)
committerGraham Inggs <ginggs@debian.org>
Tue, 9 Dec 2025 11:19:37 +0000 (11:19 +0000)
(This number is set in debian/rules.)

Needed as Debian buildds use tarballs

Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Forwarded: not-needed

Gbp-Pq: Name deb_nonversioneer_version.patch

pandas/tests/test_common.py
pandas/tests/util/test_show_versions.py

index e8a1c961c8cb6e5b1014f6baa193d4593d85d981..f198a9d57d8db55895548fd232768f12c3dd8d7d 100644 (file)
@@ -163,8 +163,7 @@ def test_standardize_mapping():
 def test_git_version():
     # GH 21295
     git_version = pd.__git_version__
-    assert len(git_version) == 40
-    assert all(c in string.hexdigits for c in git_version)
+    assert git_version == 'not-from-upstream-git'
 
 
 def test_version_tag():
index 72c9db23b210880793f37227c99e99e804800f08..94d08b4f85ea3670140c26f7f8d8733fc27bd590 100644 (file)
@@ -56,7 +56,7 @@ def test_show_versions_console(capsys):
     assert "INSTALLED VERSIONS" in result
 
     # check full commit hash
-    assert re.search(r"commit\s*:\s[0-9a-f]{40}\n", result)
+    assert re.search(r"commit\s*:\snot-from-upstream-git\n", result)
 
     # check required dependency
     # 2020-12-09 npdev has "dirty" in the tag